import request from '@/request'
import { ILogin, ISignup } from './interface'

// 登录
export const login = (param: ILogin) => {
    return request({
        url: '/auth/user/signIn',
        method: 'POST',
        params: JSON.parse(JSON.stringify(param))
    })
}

// 注册
export const signup = (params: ISignup) => {
    return request({
        url: '/auth/user/signUp',
        method: 'POST',
        params
    })
}

// 根据token获取用户的信息
export const getUserInfo = () => {
    return request({
        url: '/user_web/get_user_info',
        method: 'GET'
    })
}

// 获取地图的信息
export const getMapList = (params: any) => {
    return request({
        url: '/map_web',
        method: 'GET',
        params
    })
}
